<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
	<title>{:C('defaultinfo.name')}</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<meta name="description" content=""/>
	<meta name="author" content="{:L('AUTHOR')}"/>
	<link type="text/css" href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet" />
	<link href="__PUBLIC__/css/docs.css" rel="stylesheet"/>
	<link rel="shortcut icon" href="/crm/Public/ico/favicon.png"/>
	<script src="__PUBLIC__/js/jquery-1.9.0.min.js" type="text/javascript"></script>
	<script src="__PUBLIC__/js/jquery.PrintArea.js" type="text/javascript"></script>
</head>
<body>
<div class="container min_width1000">
	<div id="printArea">
		<style type="text/css">
			.log_top_bar{
				height: 40px;
				border-bottom:solid #6699C9 2px;
			}
			.log_title {
				position: relative;
				font-size: 16px;
				background:#6699C9;width:145px;text-align:center;height:40px;line-height:40px;color:#fff;
			}
			.title-arr{
				height: 0;
				border-width: 8px 8px 0;
				border-color: #6699c9 transparent;
				_border-color: #6699c9 #fff;
				border-style: solid;
				position: absolute;
				bottom: -8px;
				right: 30px;
			}
			.status{
				min-height: 38px;
				background: transparent url(__PUBLIC__/img/timeline_c.png) repeat-y 105px 0;
				padding-top: 20px;
				padding-bottom: 10px;
				position:relative;
				margin-left:10px;
				position:relative;
			}
			.status .status_line{
				width:50px; height:121px; border-left:1px solid #ccc; position:absolute;left:0px; top:-88px;z-index:123;
			} 
			.status_title1{
				float: left;
				width: 80px;
				height: 26px;
				background: #684C96 url(__PUBLIC__/img/line.png) 0 -6px no-repeat;
				line-height: 26px;
				text-align: center;
				color: #fff;
				font-size: 14px;
				font-weight: bold;
				padding-left:10px;
			}
			.status_title2{
				float: left;
				width: 80px;
				height: 26px;
				background: #E9180C url(__PUBLIC__/img/line.png) left -6px no-repeat;
				line-height: 26px;
				text-align: center;
				color: #fff;
				font-size: 14px;
				font-weight: bold;
				padding-left:10px;
			}
			.status_arr1{
				float: left;
				width: 0;
				height: 2px;
				border-style: solid;
				border-width: 12px 0 12px 12px;
				border-color: transparent #684C96;
			}
			.status_arr2{
				float: left;
				width: 0;
				height: 2px;
				border-style: solid;
				border-width: 12px 0 12px 12px;
				border-color: transparent #E9180C;
			}
			.status_des{
				margin-left:140px;
			}
			.log{
				overflow: hidden;
				background: transparent url(__PUBLIC__/img/timeline_c.png) repeat-y 105px 0;
			}
			
			.log_content{
				margin-left: 8px;
				position: relative;
			}
			
			.log_time{
				margin-left: 11px;
				margin-top: 10px;
				width: 80px;
				color: #999;
				text-align: right;
			}
			
			.log_arr{
				width: 43px;
				height: 32px;
				top: 8px;
				z-index: 1;
				position: absolute;
				background: transparent url(__PUBLIC__/img/tl_blue_arr.png) no-repeat 0 0;
			}
			
			.log_des{
				border: 1px solid #ddd;
				background: #f5f8fb;
				margin-left: 42px;
				padding: 10px 10px 10px 10px;
				width:700px;
				margin-bottom: 15px;
				-webkit-border-radius: 4px;
			}
			
			.log_owner{
				padding:20px;
			}
		</style>
	<volist name="list" id="vo">	
		<div class="page-header" style="text-align:center;">
			<h3>
				<switch name="vo.type">
					<case value="1">普 通 审 批</case>
					<case value="2">请 假 单</case>
					<case value="3">报 销 单</case>
					<case value="4">差 旅 单</case>
					<case value="5">借 款 单</case>
				</switch>
			</h3>
		</div>
		<div class="row">
			<div class="span12 min_width1000">
				<div class="print_head">
					<span style="width:135px;">申请人：{$vo.creator.user_name}</span>
					<span style="width:165px;">申请日期：{$vo.create_time|date='Y-m-d',###}</span>
					<span style="width:500px;">
					<switch name="vo.type">
						<case value="1">审批内容</case>
						<case value="2">请假内容</case>
						<case value="3">报销内容</case>
						<case value="4">差旅内容</case>
						<case value="5">借款内容</case>
					</switch>：{$vo.content}</span>
				</div>
				<table class="table table-bordered">
					<tbody>
						<tr><th>{:L('BASIC_INFO')}</th></tr>
						<tr style="background-color:#E0E8FF;text-align:center;">
							<if condition="$vo.type eq 1">
								<td style="text-align:center;">审批事项</td>
							</if>
							<if condition="$vo.type eq 2">
								<td style="text-align:center;">请假事项</td>
								<td style="text-align:center;">开始时间</td>
								<td style="text-align:center;">结束时间</td>
								<td style="text-align:center;">请假时长</td>
							</if>
							<if condition="$vo.type eq 3">
								<td style="text-align:center;">报销事项</td>
								<td style="text-align:center;">日期</td>
								<td style="text-align:center;">报销金额（元）</td>
							</if>
							<if condition="$vo.type eq 4">
								<td style="text-align:center;">出差事项</td>
								<td style="text-align:center;">出发地</td>
								<td style="text-align:center;">目的地</td>
								<td style="text-align:center;">出发时间</td>
								<td style="text-align:center;">结束时间</td>
								<td style="text-align:center;">预算金额（元）</td>
								<td style="text-align:center;">预支金额（元）</td>
							</if>
							<if condition="$vo.type eq 5">
								<td style="text-align:center;">借款事项</td>
								<td style="text-align:center;">借款时间</td>
								<td style="text-align:center;">借款金额（元）</td>
							</if>
						</tr>
						<if condition="$vo.type neq 3">
							<tr>
								<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo.cate}</span></td>
								<if condition="$vo.type eq 2">
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;"><if condition="$vo.start_time neq 0">{$vo.start_time|date='Y-m-d',###}</if></span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;"><if condition="$vo.end_time neq 0">{$vo.end_time|date='Y-m-d',###}</if></span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo.duration} 小时</span></td>
								</if>
								<if condition="$vo.type eq 4">
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo.start_address}</span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo.end_address}</span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;"><if condition="$vo.start_time neq 0">{$vo.start_time|date='Y-m-d',###}</if></span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;"><if condition="$vo.end_time neq 0">{$vo.end_time|date='Y-m-d',###}</if></span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo.budget}</span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo.advance}</span></td>
								</if>
								<if condition="$vo.type eq 5">
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;"><if condition="$vo.start_time neq 0">{$vo.start_time|date='Y-m-d',###}</if></span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo.money}</span></td>
								</if>
							</tr>
						<else/>
							<volist name="vo.expense" id="vo2">
								<tr>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo2.cate}</span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;"><if condition="$vo2.expense_time neq 0">{$vo2.expense_time|date='Y-m-d',###}</if></span></td>
									<td style="text-align:center;"><span style="display:inline-block;min-width:50px;">{$vo2.money}</span></td>
								</tr>
							</volist>
							<tr>
								<td></td>
								<td></td>
								<td style="text-align:center;"><strong>总计：</strong>&nbsp;&nbsp;{$vo.money_total} 元</td>
							</tr>
						</if>
					</tbody>	
				</table>
				<a name="tab2"></a>
				<div style="height:40px;"></div>
				<div class="log_top_bar">
					<div class="pull-left log_title" style="margin-left:20px;">审批进度<div class="title-arr"></div></div>
				</div>
				<empty name="vo.opinions">
					<div align="center" style="margin-top:20px;">暂无审批意见！</div>
				</empty>
				<volist name="vo.opinions" id="vo3">
					<div class="status" >
						<if condition="$key gt 0">
							<div class="status_line"></div>
						</if>
						<if condition="$vo3['is_agree'] == 1">
							<div class="status_title1">审批通过</div>
							<div class="status_arr1">&nbsp;</div>
						</if>
						<if condition="$vo3['is_agree'] == 2">
							<div class="status_title2">审批未通过</div>
							<div class="status_arr2">&nbsp;</div>
						</if>
						<div class="status_des">
							<p>审&nbsp;批&nbsp;人：{$vo3.examine_role}</p>
							<p>审批时间：{$vo3['create_time']|date="Y-m-d H:i:s", ###}</p>
							<p>审批意见：<if condition="$vo3['is_agree'] == 1">同意。</if><if condition="$vo3['is_agree'] == 2">不同意。</if>{$vo3.opinion}</p>
						</div>
					</div>
				</volist>
			</div>
		</div>
	</volist>	
	</div>
	<div style="text-align:center;"><br/>
		<button type="button" id="print_btn" class="btn btn-primary">打印</button>&nbsp;
		<button type="button" onclick="javascript:window.close();" class="btn">关闭</button>
	</div>
</div>
<script type="text/javascript">
/**
 * 打印
 **/
$('#print_btn').click(function(){
	$('#printArea').printArea();
	$(this).html('加载中 ...');
	setTimeout("$('#print_btn').html('打印');",1200);
});
</script>
</body>
</html>
